package gameClass;

import items.*;

/**
 * @author Ben Elliott
 */
public class Equipment {
	private Armor head, chest, legs, hands, feet, waist;
	
	/* Public attribute fields */
	public int TotalDefense;
	
	public Equipment() {
		// Initialize all equipment to null
		
		// Set total values to zero
		TotalDefense = 0;
	}
	
	public void equip(Armor item) {
		switch (item.slot){
			case Head :
				if (head == null) {
					// Equip....
					addTotal(item);
				} else {
					// Unequip....
					subTotal(item);
					
					//Equip....
					addTotal(item);
				}
		}
	}
	
	private void addTotal(Armor item) {
		TotalDefense += item.Defense;
		// For all attributes ...
	}
	
	private void subTotal(Armor item) {
		TotalDefense -= item.Defense;
		// For all attributes ...
	}
}
